//
//  HHRecommendTypeCell.m
//  百思不得姐
//
//  Created by hjl on 16/4/12.
//  Copyright © 2016年 hjl. All rights reserved.
//

#import "HHRecommendTypeCell.h"
#import "HHRecommendType.h"
@interface HHRecommendTypeCell ()
@property (weak, nonatomic) IBOutlet UIView *leftRedView;

@end

@implementation HHRecommendTypeCell

- (void)setType:(HHRecommendType *)type{
    _type = type;
    self.textLabel.text = type.name;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    self.leftRedView.hidden = !selected;
    if (selected) {
        self.textLabel.textColor = [UIColor redColor];
    }else{
        self.textLabel.textColor = HHRGBColor(24, 24, 24, 1.0);
    }
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.textLabel.height = self.height - 2;
}

@end
